package com.demo.methodlocalinnerclass;

public class MethodLocalInnerClass {

	int x=20;
	
	
	public static void main(String[] args) {

		 MethodLocalInnerClass methodLocalInnerClass=new MethodLocalInnerClass();
		 methodLocalInnerClass.ab();
		
		
	}




	public void ab(){

	final	 int y=30;
		//local to the method only.
	 class  MyMethodLocalInnerClass {

			public void demoMehtod(){
				System.out.println("in demo method.."+x);
				
				System.out.println(y);
			}

		}

		MyMethodLocalInnerClass innerClass=new MyMethodLocalInnerClass();
        innerClass.demoMehtod();

	}
}
